www.gusucode.com > 茶都拼客网全功能版 8 > 茶都拼客网全功能版 8.8源码程序/teasdxmccom/茶都拼客网V8.8(全功能,无限制,完全开源)/Ku_Eweb/Admin/private.js
// 去空格,left,right,all可选 function BaseTrim(str){ lIdx=0;rIdx=str.length; if (BaseTrim.arguments.length==2) act=BaseTrim.arguments[1].toLowerCase() else act="all" for(var i=0;i<str.length;i++){ thelStr=str.substring(lIdx,lIdx+1) therStr=str.substring(rIdx,rIdx-1) if ((act=="all" || act=="left") && thelStr==" "){ lIdx++ } if ((act=="all" || act=="right") && therStr==" "){ rIdx-- } } str=str.slice(lIdx,rIdx) return str } // 基本信息提示,得到焦点并选定 function BaseAlert(theText,notice){ alert(notice); theText.focus(); theText.select(); return false; }